$(function () {

$('.btn-delete').click(function () {
    Swal.fire({
        title: '是否删除?',
        text: "You won't be able to revert this!",
        icon: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#3085d6',
        cancelButtonColor: '#d33',
        confirmButtonText: '是',
        cancelButtonText:'否'
    }).then((result) => {
        if (result.value) {
            //点击确认按钮后做的事情
            window.location.href=$(this).data("url");
            /*
                          window.location.href="/department/delete?id="
            */
        }
    })
})
});